<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta th:replace="frontend/fragment/style"/>
    <title th:text="${settings.website_title+' - '+settings.menu_note}"></title>
</head>
<body class="layui-anim layui-anim-fadein simple">
<div id="note-app">
    <bmy-header-mini :params="params" :st="false" :bodyid="bodyId" :show-small="false"
                     :note="current"></bmy-header-mini>
    <hr class="header-hr">
    <bmy-block :quote="quote"></bmy-block>
    <bmy-notes :sw="sw" :su="su"></bmy-notes>
    <bmy-footer :words="params.footer_words"></bmy-footer>
    <bottom-nav :params="params" :layui-element="elem"></bottom-nav>
</div>
<div th:replace="frontend/fragment/script"></div>
<script src="/static/assets/js/frontend/svg.js"></script>
<script th:inline="javascript">
    document.body.addEventListener('touchstart', function () {
    });
    layui.config({base: '/static/assets/js/frontend/'}).extend({
        note: 'note'
    });
    layui.use(['laytpl', 'element', 'flow', 'note'], function () {
        var flow = layui.flow;
        var element = layui.element;
        var laytpl = layui.laytpl;
        var note = layui.note;

        BMY.noteVm = new Vue({
            el: "#note-app",
            data: {
                bodyId: "note-body"
                , params: [[${settings}]]
                , su: [[${su}]]
                , current: true
                , quote: {
                    showText: true
                    , showNote: true
                    , showSearch: false
                    , searchCount: 0
                    , noteCount: [[${noteCount}]]
                    , text: [[${settings.index_top_words}]]
                }
                , sw: BMY.getParam("t") !== undefined ? decodeURIComponent(BMY.getParam("t")) : BMY.getParam("t")
                , elem: element
            },
            mounted: function () {
                BMY.stickyIt();
                new hcSticky("#note-operate", {
                    stickTo: '#note-body'
                    , top: 85
                })
            }
        })

        flow.load({
            elem: '#timeline'
            , done: function (page, next) {
                return note($(".layui-note-cover"), page, next, laytpl);
            }
        });
    });
</script>
</body>
</html>